package gjtx7;

import java.io.File;
import java.util.Scanner;

public class DeleteText {
    public static void main(String[] args) {
        Scanner in=new Scanner(System.in);
        System.out.println("输入一个文本文件名:");
        String str=in.nextLine();
        File f=new File(str);
        boolean b= f.delete();
        if (b==true){
            System.out.println("已删除");
        }else {
            System.out.println("未找到！");
        }
    }
}
